public class Factory {

	public ILeilao getLeilaoFactory() {
		Class aClass;
		ILeilao leilao = null;
		try {			
			PropertiesLoader loader = new PropertiesLoader();		
			String propiedade = loader.getValor("LEILAO");
			ClassLoader classLoader = Factory.class.getClassLoader();
			aClass = classLoader.loadClass(propiedade);
			leilao = (ILeilao) aClass.newInstance();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		
		return leilao;
	}
}
